package com.zmn.oms.common.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

/**
 * 类描述：附件类型枚举
 *
 * @author heciqi
 * @date 2020/6/4 22:09
 */
@AllArgsConstructor
@Getter
public enum OrderAttachmentCategoryTypeEnum {
    PICTURE(1, "照片"),
    VIDEO(2, "视频"),
    AUDIO(3, "音频");

    Integer code;
    String name;

    public static final Map<Integer, OrderAttachmentCategoryTypeEnum> cache = new HashMap<>();

    static {
        for (OrderAttachmentCategoryTypeEnum orderAttachmentCategoryTypeEnum : EnumSet.allOf(OrderAttachmentCategoryTypeEnum.class)) {
            cache.put(orderAttachmentCategoryTypeEnum.getCode(), orderAttachmentCategoryTypeEnum);
        }
    }
}
